package labs;
/*
 * x = 100/1 + 99/2 + 98/3 + ... + 1/100
 */

public class DemoWhile03 {
    
    public static void main(String[] args) {
        
        double x = 0D; //, i = 100D;  // FORMA CORRECTA DE DECLARAR UNA VARIABLE DOUBLE
        int i = 1;  // FORMA CORRECTA DE DECLARAR UNA VARIABLE DOUBLE
    
        while (i<=100)
        {
          x += (101D - i)/i;
          ++i;
        }
        System.out.println("x=" + x);
    }
}
